//   Copyright 2012,2013 Vaughn Vernon
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

package com.saasovation.agilepm.domain.model.team;

import java.util.Collection;

import com.saasovation.agilepm.domain.model.tenant.TenantId;

/**
 * 产品经理存储库
 * @author learn
 */
public interface ProductOwnerRepository {
    /**
     * 租户的所有产品经理清单
     * @param aTenantId                 租户ID
     * @return                          返回集合
     */
    public Collection<ProductOwner> allProductOwnersOfTenant(TenantId aTenantId);

    /**
     * 获取ID的产品经理
     * @param aTenantId                 租户ID
     * @param aUsername                 用户名
     * @return                          返回产品经理
     */
    public ProductOwner productOwnerOfIdentity(TenantId aTenantId, String aUsername);

    /**
     * 移除（产品经理）
     * @param aProductOwner             产品经理
     */
    public void remove(ProductOwner aProductOwner);

    /**
     * 移除所有（产品经理清单）
     * @param aProductOwnerCollection   产品经理清单
     */
    public void removeAll(Collection<ProductOwner> aProductOwnerCollection);

    /**
     * 保存（产品经理）
     * @param aProductOwner             产品经理
     */
    public void save(ProductOwner aProductOwner);

    /**
     * 保存所有（产品经理清单）
     * @param aProductOwnerCollection   产品经理清单
     */
    public void saveAll(Collection<ProductOwner> aProductOwnerCollection);
}
